import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AdminLayoutComponent } from './_layout/layout.component';
import { RoleBasicComponent } from './role/role-basic.component';
import { DeptmentBasicComponent } from './deptment/deptment-basic.component';
import { MenuBasicComponent } from './menu/menu-basic.component';
import { UserListComponent } from './user/user-list.component';

const routes: Routes = [
  {
    path: '',
    component: AdminLayoutComponent,
    children: [
      { path: '', redirectTo: 'user', pathMatch: 'full' },
      { path: 'user', component: UserListComponent },
      { path: 'role', component: RoleBasicComponent },
      { path: 'dept', component: DeptmentBasicComponent },
      { path: 'menu', component: MenuBasicComponent },
    ],
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class AdminRoutingModule {}
